import * as ajaxRequest from "../ajaxRequest";

import environment from "@/environment/index";

/**
 * 获取数据管理
 * @param {*} option 
 */
// 数据列表
export const getList = options => {
    return ajaxRequest.get(`${environment.productApi}/api/v1/Channel/getlist`, options);
};

// 详情
export const getDetail = options => {
    return ajaxRequest.get(`${environment.productApi}/api/v1/Channel/GetById/${options}`);
};
// 新增
export const postCreate = options => {
    return ajaxRequest.post(`${environment.productApi}/api/v1/Channel/Create`, options);
};
// 编辑
export const putEdit = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Channel/Edit`, options);
};
// 下架
export const putOfflone = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Channel/disable/${options}`);
};
// 上架
export const putOnline = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Channel/enable/${options}`);
};

